const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const ComperssionWebpackPlugin = require('compression-webpack-plugin')
if (process.env.NODE_ENV === 'production') {
    module.exports = {
        devtool: 'none',
        plugins: [
            new BundleAnalyzerPlugin(),
            new ComperssionWebpackPlugin({
                minRatio: 0.8
            })
        ],
        externals: {
            vue: "Vue",
            vuex: "Vuex",
            "vue-router": 'VueRouter',
            axios: 'axios',
            echarts: 'echarts'
        }
    }
} else {
    module.exports = {}
}